using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

using Sunyi.Project.WebPoint.DataContract;

namespace Sunyi.Project.WebPoint.DataContract
{
    [Serializable]
    public partial class Permission : IDataEntity
    {
        #region Property

        public Guid Id
        {
            get;
            set;
        }

        public string PermissionName
        {
            get;
            set;
        }

        public bool IsSystemData
        {
            get;
            set;
        }

        public bool IsActive
        {
            get;
            set;
        }

        public DateTime InsertTimestamp
        {
            get;
            set;
        }

        public DateTime UpdateTimestamp
        {
            get;
            set;
        }

        #endregion

        #region Override Method

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != typeof(Permission)) return false;

            return this.Id == ((Permission)obj).Id;
        }

        public override int GetHashCode()
        {
            return this.Id.GetHashCode();
        }

        #endregion
    }
}
